3.761 \(\int \sec (c+d x) (a+a \sin (c+d x))^2 \tan (c+d x) \, dx\)

Optimal. Leaf size=43 \[ \frac {2 a^2 \cos (c+d x)}{d}-2 a^2 x+\frac {\sec (c+d x) (a \sin (c+d x)+a)^2}{d} \]

[Out]

-2*a^2*x+2*a^2*cos(d*x+c)/d+sec(d*x+c)*(a+a*sin(d*x+c))^2/d

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {2855, 2638} \[ \frac {2 a^2 \cos (c+d x)}{d}-2 a^2 x+\frac {\sec (c+d x) (a \sin (c+d x)+a)^2}{d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]*(a + a*Sin[c + d*x])^2*Tan[c + d*x],x]

[Out]

-2*a^2*x + (2*a^2*Cos[c + d*x])/d + (Sec[c + d*x]*(a + a*Sin[c + d*x])^2)/d

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 2855

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.)
 + (f_.)*(x_)]), x_Symbol] :> -Simp[((b*c + a*d)*(g*Cos[e + f*x])^(p + 1)*(a + b*Sin[e + f*x])^m)/(a*f*g*(p +
1)), x] + Dist[(b*(a*d*m + b*c*(m + p + 1)))/(a*g^2*(p + 1)), Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x]
)^(m - 1), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && EqQ[a^2 - b^2, 0] && GtQ[m, -1] && LtQ[p, -1]

Rubi steps

\begin {align*} \int \sec (c+d x) (a+a \sin (c+d x))^2 \tan (c+d x) \, dx &=\frac {\sec (c+d x) (a+a \sin (c+d x))^2}{d}-(2 a) \int (a+a \sin (c+d x)) \, dx\\ &=-2 a^2 x+\frac {\sec (c+d x) (a+a \sin (c+d x))^2}{d}-\left (2 a^2\right ) \int \sin (c+d x) \, dx\\ &=-2 a^2 x+\frac {2 a^2 \cos (c+d x)}{d}+\frac {\sec (c+d x) (a+a \sin (c+d x))^2}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.37, size = 90, normalized size = 2.09 \[ \frac {(a \sin (c+d x)+a)^2 \left (-2 (c+d x)+\cos (c+d x)+\frac {4 \sin \left (\frac {1}{2} (c+d x)\right )}{\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )}\right )}{d \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )^4} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]*(a + a*Sin[c + d*x])^2*Tan[c + d*x],x]

[Out]

((-2*(c + d*x) + Cos[c + d*x] + (4*Sin[(c + d*x)/2])/(Cos[(c + d*x)/2] - Sin[(c + d*x)/2]))*(a + a*Sin[c + d*x
])^2)/(d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^4)

________________________________________________________________________________________

fricas [B]  time = 0.44, size = 101, normalized size = 2.35 \[ -\frac {2 \, a^{2} d x - a^{2} \cos \left (d x + c\right )^{2} - 2 \, a^{2} + {\left (2 \, a^{2} d x - 3 \, a^{2}\right )} \cos \left (d x + c\right ) - {\left (2 \, a^{2} d x - a^{2} \cos \left (d x + c\right ) + 2 \, a^{2}\right )} \sin \left (d x + c\right )}{d \cos \left (d x + c\right ) - d \sin \left (d x + c\right ) + d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2*sin(d*x+c)*(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-(2*a^2*d*x - a^2*cos(d*x + c)^2 - 2*a^2 + (2*a^2*d*x - 3*a^2)*cos(d*x + c) - (2*a^2*d*x - a^2*cos(d*x + c) +
2*a^2)*sin(d*x + c))/(d*cos(d*x + c) - d*sin(d*x + c) + d)

________________________________________________________________________________________

giac [B]  time = 0.19, size = 89, normalized size = 2.07 \[ -\frac {2 \, {\left ({\left (d x + c\right )} a^{2} + \frac {2 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2*sin(d*x+c)*(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-2*((d*x + c)*a^2 + (2*a^2*tan(1/2*d*x + 1/2*c)^2 - a^2*tan(1/2*d*x + 1/2*c) + 3*a^2)/(tan(1/2*d*x + 1/2*c)^3
- tan(1/2*d*x + 1/2*c)^2 + tan(1/2*d*x + 1/2*c) - 1))/d

________________________________________________________________________________________

maple [A]  time = 0.32, size = 76, normalized size = 1.77 \[ \frac {a^{2} \left (\frac {\sin ^{4}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )\right )+2 a^{2} \left (\tan \left (d x +c \right )-d x -c \right )+\frac {a^{2}}{\cos \left (d x +c \right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^2*sin(d*x+c)*(a+a*sin(d*x+c))^2,x)

[Out]

1/d*(a^2*(sin(d*x+c)^4/cos(d*x+c)+(2+sin(d*x+c)^2)*cos(d*x+c))+2*a^2*(tan(d*x+c)-d*x-c)+a^2/cos(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 1.07, size = 57, normalized size = 1.33 \[ -\frac {2 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a^{2} - a^{2} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )} - \frac {a^{2}}{\cos \left (d x + c\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2*sin(d*x+c)*(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-(2*(d*x + c - tan(d*x + c))*a^2 - a^2*(1/cos(d*x + c) + cos(d*x + c)) - a^2/cos(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 9.18, size = 117, normalized size = 2.72 \[ -2\,a^2\,x-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a^2\,\left (d\,x-1\right )-2\,a^2\,d\,x\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,a^2\,\left (d\,x-2\right )-2\,a^2\,d\,x\right )-2\,a^2\,\left (d\,x-3\right )+2\,a^2\,d\,x}{d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sin(c + d*x)*(a + a*sin(c + d*x))^2)/cos(c + d*x)^2,x)

[Out]

- 2*a^2*x - (tan(c/2 + (d*x)/2)*(2*a^2*(d*x - 1) - 2*a^2*d*x) - tan(c/2 + (d*x)/2)^2*(2*a^2*(d*x - 2) - 2*a^2*
d*x) - 2*a^2*(d*x - 3) + 2*a^2*d*x)/(d*(tan(c/2 + (d*x)/2) - 1)*(tan(c/2 + (d*x)/2)^2 + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} \left (\int \sin {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 2 \sin ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \sin ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**2*sin(d*x+c)*(a+a*sin(d*x+c))**2,x)

[Out]

a**2*(Integral(sin(c + d*x)*sec(c + d*x)**2, x) + Integral(2*sin(c + d*x)**2*sec(c + d*x)**2, x) + Integral(si
n(c + d*x)**3*sec(c + d*x)**2, x))

________________________________________________________________________________________